<?php
/**
 * OrangeHRM is a comprehensive Human Resource Management (HRM) System that captures
 * all the essential functionalities required for any enterprise.
 * Copyright (C) 2006 OrangeHRM Inc., http://www.orangehrm.com
 *
 * OrangeHRM is free software; you can redistribute it and/or modify it under the terms of
 * the GNU General Public License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * OrangeHRM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with this program;
 * if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301, USA
 *
 */
if(isset($records['messageType'])) {
if ($records['messageType'] == 'SUCCESS') {
	$records['message'] = $lang_Class_ClassConfigSaving_SUCCESS;
} elseif ($records['messageType'] == 'FAILURE') {
	$records['message'] = $lang_Class_ClassConfigSaving_FAILURE;
} else {
	$records['message'] = null;
}
} else {
	$records['message'] = null;
}

?>

<div class="formpage">
    <div class="outerbox">
        <div class="mainHeading"><h2>班制定义</h2></div>
        <?php if (isset($records['message'])) { ?>
            <div class="messagebar">
                <span class="<?php echo $records['messageType']; ?>"><?php echo $records['message']; ?></span>
            </div>
        <?php } ?>

<form action="?argcode=defineclass&action=save" method="post" id="classConfig" name="classConfig">
<table width="580" border="0" cellpadding="4" cellspacing="0">
	<tr style="padding-top:0px;">
      <td colspan="4"><b>注：A、B、C班制于车间三班倒，I、J、K班制用于保安班，O、P、Q班制用于厨房班</b></td>
    </tr>
	<tr>
      <td colspan="4"><b>A班制</b></td>
    </tr>
    <tr>
      <td>班制性质：</td>
      <td><input type="radio" name="typeA" value="1" checked="checked" />日班 &nbsp; </td>
      <td>工作小时数：</td>
      <td><input type="text" id="hoursA" name="hoursA" size="3" value="<?php echo $records['hoursA']?$records['hoursA']:8; ?>" />小时</td>
    </tr>
    <tr>
      <td>上班时间(00:00)：</td>
      <td><input type="text" id="starttimeA" name="starttimeA" size="8" value="<?php echo $records['starttimeA']; ?>"/></td>
      <td>下班时间(00:00)：</td>
      <td><input type="text" id="endtimeA" name="endtimeA" size="8" value="<?php echo $records['endtimeA']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段-开始：</td>
      <td><input type="text" id="resttime_startA" name="resttime_startA" size="8" value="<?php echo $records['resttime_startA']; ?>" /></td>
      <td>休息时间段-结束：</td>
      <td><input type="text" id="resttime_endA" name="resttime_endA" size="8" value="<?php echo $records['resttime_endA']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段是否需打卡：</td>
      <td colspan="3"><input type="radio" name="resttime_needA" value="1" <?php if($records['resttime_needA']==1) echo 'checked="checked"';?> />是 &nbsp;
      <input type="radio" name="resttime_needA" value="0" <?php if($records['resttime_needA']==0) echo 'checked="checked"';?> />否 &nbsp; </td>
    </tr>
    
	<tr>
      <td colspan="4"><b>B班制</b></td>
    </tr>
    <tr>
      <td>班制性质：</td>
      <td><input type="radio" name="typeB" value="1" checked="checked" />日班 &nbsp; </td>
      <td>工作小时数：</td>
      <td><input type="text" id="hoursB" name="hoursB" size="3" value="<?php echo $records['hoursB']?$records['hoursB']:8; ?>" />小时</td>
    </tr>
    <tr>
      <td>上班时间(00:00)：</td>
      <td><input type="text" id="starttimeB" name="starttimeB" size="8" value="<?php echo $records['starttimeB']; ?>" /></td>
      <td>下班时间(00:00)：</td>
      <td><input type="text" id="endtimeB" name="endtimeB" size="8" value="<?php echo $records['endtimeB']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段-开始：</td>
      <td><input type="text" id="resttime_startB" name="resttime_startB" size="8" value="<?php echo $records['resttime_startB']; ?>" /></td>
      <td>休息时间段-结束：</td>
      <td><input type="text" id="resttime_endB" name="resttime_endB" size="8" value="<?php echo $records['resttime_endB']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段是否需打卡：</td>
      <td colspan="3"><input type="radio" name="resttime_needB" value="1" <?php if($records['resttime_needB']==1) echo 'checked="checked"';?> />是 &nbsp;
      <input type="radio" name="resttime_needB" value="0" <?php if($records['resttime_needB']==0) echo 'checked="checked"';?> />否 &nbsp; </td>
    </tr>
    
	<tr>
      <td colspan="4"><b>C班制</b></td>
    </tr>
    <tr>
      <td>班制性质：</td>
      <td><input type="radio" name="typeC" value="2" checked="checked" />通宵班 &nbsp; </td>
      <td>工作小时数：</td>
      <td><input type="text" id="hoursC" name="hoursC" size="3" value="<?php echo $records['hoursC']?$records['hoursC']:8; ?>" />小时</td>
    </tr>
    <tr>
      <td>上班时间(00:00)：</td>
      <td><input type="text" id="starttimeC" name="starttimeC" size="8" value="<?php echo $records['starttimeC']; ?>" /></td>
      <td>下班时间(00:00)：</td>
      <td><input type="text" id="endtimeC" name="endtimeC" size="8" value="<?php echo $records['endtimeC']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段-开始：</td>
      <td><input type="text" id="resttime_startC" name="resttime_startC" size="8" value="<?php echo $records['resttime_startC']; ?>" /></td>
      <td>休息时间段-结束：</td>
      <td><input type="text" id="resttime_endC" name="resttime_endC" size="8" value="<?php echo $records['resttime_endC']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段是否需打卡：</td>
      <td colspan="3"><input type="radio" name="resttime_needC" value="1" <?php if($records['resttime_needC']==1) echo 'checked="checked"';?> />是 &nbsp;
      <input type="radio" name="resttime_needC" value="0" <?php if($records['resttime_needC']==0) echo 'checked="checked"';?> />否 &nbsp; </td>
    </tr>
    
	<tr>
      <td colspan="4"><b>H班制</b></td>
    </tr>
    <tr>
      <td>班制性质：</td>
      <td><input type="radio" name="typeH" value="3" checked="checked" />国家休假 &nbsp; </td>
      <td>一天休息小时数：</td>
      <td><input type="text" id="hoursH" name="hoursH" size="3" value="24" readonly />小时</td>
    </tr>
	<tr>
      <td colspan="4"><b>W班制</b></td>
    </tr>
    <tr>
      <td>班制性质：</td>
      <td><input type="radio" name="typeW" value="4" checked="checked" />周末休假 &nbsp; </td>
      <td>一天休息小时数：</td>
      <td><input type="text" id="hoursW" name="hoursW" size="3" value="24" readonly />小时</td>
    </tr>
	<!--tr>
      <td colspan="4"><b>M班制</b></td>
    </tr>
    <tr>
      <td>班制性质：</td>
      <td><input type="radio" name="typeM" value="5" checked="checked" />补充休假 &nbsp; </td>
      <td>一天休息小时数：</td>
      <td><input type="text" id="hoursM" name="hoursM" size="3" value="24" readonly />小时</td>
    </tr-->
    
    <tr>
      <td colspan="4"><b>D班制(行政日班制)</b></td>
    </tr>
    <tr>
      <td>班制性质：</td>
      <td><input type="radio" name="typeD" value="1" checked="checked" />日班 &nbsp; </td>
      <td>工作小时数：</td>
      <td><input type="text" id="hoursD" name="hoursD" size="3" value="<?php echo $records['hoursD']?$records['hoursD']:8; ?>" />小时</td>
    </tr>
    <tr>
      <td>上班时间(00:00)：</td>
      <td><input type="text" id="starttimeD" name="starttimeD" size="8" value="<?php echo $records['starttimeD']; ?>"/></td>
      <td>下班时间(00:00)：</td>
      <td><input type="text" id="endtimeD" name="endtimeD" size="8" value="<?php echo $records['endtimeD']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段-开始：</td>
      <td><input type="text" id="resttime_startD" name="resttime_startD" size="8" value="<?php echo $records['resttime_startD']; ?>" /></td>
      <td>休息时间段-结束：</td>
      <td><input type="text" id="resttime_endD" name="resttime_endD" size="8" value="<?php echo $records['resttime_endD']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段是否需打卡：</td>
      <td colspan="3"><input type="radio" name="resttime_needD" value="1" <?php if($records['resttime_needD']==1) echo 'checked="checked"';?> />是 &nbsp;
      <input type="radio" name="resttime_needD" value="0" <?php if($records['resttime_needD']==0) echo 'checked="checked"';?> />否 &nbsp; </td>
    </tr>
    
	<tr>
      <td colspan="4"><b>N班制(行政夜班制)</b></td>
    </tr>
    <tr>
      <td>班制性质：</td>
      <td><input type="radio" name="typeN" value="1" checked="checked" />夜班 &nbsp; </td>
      <td>工作小时数：</td>
      <td><input type="text" id="hoursN" name="hoursN" size="3" value="<?php echo $records['hoursN']?$records['hoursN']:8; ?>" />小时</td>
    </tr>
    <tr>
      <td>上班时间(00:00)：</td>
      <td><input type="text" id="starttimeN" name="starttimeN" size="8" value="<?php echo $records['starttimeN']; ?>" /></td>
      <td>下班时间(00:00)：</td>
      <td><input type="text" id="endtimeN" name="endtimeN" size="8" value="<?php echo $records['endtimeN']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段-开始：</td>
      <td><input type="text" id="resttime_startN" name="resttime_startN" size="8" value="<?php echo $records['resttime_startN']; ?>" /></td>
      <td>休息时间段-结束：</td>
      <td><input type="text" id="resttime_endN" name="resttime_endN" size="8" value="<?php echo $records['resttime_endN']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段是否需打卡：</td>
      <td colspan="3"><input type="radio" name="resttime_needN" value="1" <?php if($records['resttime_needN']==1) echo 'checked="checked"';?> />是 &nbsp;
      <input type="radio" name="resttime_needN" value="0" <?php if($records['resttime_needN']==0) echo 'checked="checked"';?> />否 &nbsp; </td>
    </tr>
    
     <tr>
      <td colspan="4"><b>保安I班</b></td>
    </tr>
    <tr>
      <td>班制性质：</td>
      <td><input type="radio" name="typeI" value="1" checked="checked" />日班 &nbsp; </td>
      <td>工作小时数：</td>
      <td><input type="text" id="hoursI" name="hoursI" size="3" value="<?php echo $records['hoursI']?$records['hoursI']:8; ?>" />小时</td>
    </tr>
    <tr>
      <td>上班时间(00:00)：</td>
      <td><input type="text" id="starttimeI" name="starttimeI" size="8" value="<?php echo $records['starttimeI']; ?>"/></td>
      <td>下班时间(00:00)：</td>
      <td><input type="text" id="endtimeI" name="endtimeI" size="8" value="<?php echo $records['endtimeI']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段1-开始：</td>
      <td><input type="text" id="resttime_startI1" name="resttime_startI1" size="8" value="<?php echo $records['resttime_startI1']; ?>" /></td>
      <td>休息时间段1-结束：</td>
      <td><input type="text" id="resttime_endI1" name="resttime_endI1" size="8" value="<?php echo $records['resttime_endI1']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段2-开始：</td>
      <td><input type="text" id="resttime_startI2" name="resttime_startI2" size="8" value="<?php echo $records['resttime_startI2']; ?>" /></td>
      <td>休息时间段2-结束：</td>
      <td><input type="text" id="resttime_endI2" name="resttime_endI2" size="8" value="<?php echo $records['resttime_endI2']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段是否需打卡：</td>
      <td colspan="3"><input type="radio" name="resttime_needI" value="1" <?php if($records['resttime_needI']==1) echo 'checked="checked"';?> />是 &nbsp;
      <input type="radio" name="resttime_needI" value="0" <?php if($records['resttime_needI']==0) echo 'checked="checked"';?> />否 &nbsp; </td>
    </tr>
    
    <tr>
      <td colspan="4"><b>保安J班</b></td>
    </tr>
    <tr>
      <td>班制性质：</td>
      <td><input type="radio" name="typeJ" value="1" checked="checked" />日班 &nbsp; </td>
      <td>工作小时数：</td>
      <td><input type="text" id="hoursJ" name="hoursJ" size="3" value="<?php echo $records['hoursJ']?$records['hoursJ']:8; ?>" />小时</td>
    </tr>
    <tr>
      <td>上班时间(00:00)：</td>
      <td><input type="text" id="starttimeJ" name="starttimeJ" size="8" value="<?php echo $records['starttimeJ']; ?>"/></td>
      <td>下班时间(00:00)：</td>
      <td><input type="text" id="endtimeJ" name="endtimeJ" size="8" value="<?php echo $records['endtimeJ']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段1-开始：</td>
      <td><input type="text" id="resttime_startJ1" name="resttime_startJ1" size="8" value="<?php echo $records['resttime_startJ1']; ?>" /></td>
      <td>休息时间段1-结束：</td>
      <td><input type="text" id="resttime_endJ1" name="resttime_endJ1" size="8" value="<?php echo $records['resttime_endJ1']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段2-开始：</td>
      <td><input type="text" id="resttime_startJ2" name="resttime_startJ2" size="8" value="<?php echo $records['resttime_startJ2']; ?>" /></td>
      <td>休息时间段2-结束：</td>
      <td><input type="text" id="resttime_endJ2" name="resttime_endJ2" size="8" value="<?php echo $records['resttime_endJ2']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段是否需打卡：</td>
      <td colspan="3"><input type="radio" name="resttime_needJ" value="1" <?php if($records['resttime_needJ']==1) echo 'checked="checked"';?> />是 &nbsp;
      <input type="radio" name="resttime_needJ" value="0" <?php if($records['resttime_needJ']==0) echo 'checked="checked"';?> />否 &nbsp; </td>
    </tr>
    
    <tr>
      <td colspan="4"><b>保安K班</b></td>
    </tr>
    <tr>
      <td>班制性质：</td>
      <td><input type="radio" name="typeK" value="2" checked="checked" />通宵班 &nbsp; </td>
      <td>工作小时数：</td>
      <td><input type="text" id="hoursK" name="hoursK" size="3" value="<?php echo $records['hoursK']?$records['hoursK']:8; ?>" />小时</td>
    </tr>
    <tr>
      <td>上班时间(00:00)：</td>
      <td><input type="text" id="starttimeK" name="starttimeK" size="8" value="<?php echo $records['starttimeK']; ?>"/></td>
      <td>下班时间(00:00)：</td>
      <td><input type="text" id="endtimeK" name="endtimeK" size="8" value="<?php echo $records['endtimeK']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段1-开始：</td>
      <td><input type="text" id="resttime_startK1" name="resttime_startK1" size="8" value="<?php echo $records['resttime_startK1']; ?>" /></td>
      <td>休息时间段1-结束：</td>
      <td><input type="text" id="resttime_endK1" name="resttime_endK1" size="8" value="<?php echo $records['resttime_endK1']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段2-开始：</td>
      <td><input type="text" id="resttime_startK2" name="resttime_startK2" size="8" value="<?php echo $records['resttime_startK2']; ?>" /></td>
      <td>休息时间段2-结束：</td>
      <td><input type="text" id="resttime_endK2" name="resttime_endK2" size="8" value="<?php echo $records['resttime_endK2']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段是否需打卡：</td>
      <td colspan="3"><input type="radio" name="resttime_needK" value="1" <?php if($records['resttime_needK']==1) echo 'checked="checked"';?> />是 &nbsp;
      <input type="radio" name="resttime_needK" value="0" <?php if($records['resttime_needK']==0) echo 'checked="checked"';?> />否 &nbsp; </td>
    </tr>
    
     <tr>
      <td colspan="4"><b>厨房O班</b></td>
    </tr>
    <tr>
      <td>班制性质：</td>
      <td><input type="radio" name="typeO" value="1" checked="checked" />日班 &nbsp; </td>
      <td>工作小时数：</td>
      <td><input type="text" id="hoursO" name="hoursO" size="3" value="<?php echo $records['hoursO']?$records['hoursO']:8; ?>" />小时</td>
    </tr>
    <tr>
      <td>上班时间(00:00)：</td>
      <td><input type="text" id="starttimeO" name="starttimeO" size="8" value="<?php echo $records['starttimeO']; ?>"/></td>
      <td>下班时间(00:00)：</td>
      <td><input type="text" id="endtimeO" name="endtimeO" size="8" value="<?php echo $records['endtimeO']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段1-开始：</td>
      <td><input type="text" id="resttime_startO1" name="resttime_startO1" size="8" value="<?php echo $records['resttime_startO1']; ?>" /></td>
      <td>休息时间段1-结束：</td>
      <td><input type="text" id="resttime_endO1" name="resttime_endO1" size="8" value="<?php echo $records['resttime_endO1']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段2-开始：</td>
      <td><input type="text" id="resttime_startO2" name="resttime_startO2" size="8" value="<?php echo $records['resttime_startO2']; ?>" /></td>
      <td>休息时间段2-结束：</td>
      <td><input type="text" id="resttime_endO2" name="resttime_endO2" size="8" value="<?php echo $records['resttime_endO2']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段是否需打卡：</td>
      <td colspan="3"><input type="radio" name="resttime_needO" value="1" <?php if($records['resttime_needO']==1) echo 'checked="checked"';?> />是 &nbsp;
      <input type="radio" name="resttime_needO" value="0" <?php if($records['resttime_needO']==0) echo 'checked="checked"';?> />否 &nbsp; </td>
    </tr>
    
    <tr>
      <td colspan="4"><b>厨房P班</b></td>
    </tr>
    <tr>
      <td>班制性质：</td>
      <td><input type="radio" name="typeP" value="1" checked="checked" />日班 &nbsp; </td>
      <td>工作小时数：</td>
      <td><input type="text" id="hoursP" name="hoursP" size="3" value="<?php echo $records['hoursP']?$records['hoursP']:8; ?>" />小时</td>
    </tr>
    <tr>
      <td>上班时间(00:00)：</td>
      <td><input type="text" id="starttimeP" name="starttimeP" size="8" value="<?php echo $records['starttimeP']; ?>"/></td>
      <td>下班时间(00:00)：</td>
      <td><input type="text" id="endtimeP" name="endtimeP" size="8" value="<?php echo $records['endtimeP']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段1-开始：</td>
      <td><input type="text" id="resttime_startP1" name="resttime_startP1" size="8" value="<?php echo $records['resttime_startP1']; ?>" /></td>
      <td>休息时间段1-结束：</td>
      <td><input type="text" id="resttime_endP1" name="resttime_endP1" size="8" value="<?php echo $records['resttime_endP1']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段2-开始：</td>
      <td><input type="text" id="resttime_startP2" name="resttime_startP2" size="8" value="<?php echo $records['resttime_startP2']; ?>" /></td>
      <td>休息时间段2-结束：</td>
      <td><input type="text" id="resttime_endP2" name="resttime_endP2" size="8" value="<?php echo $records['resttime_endP2']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段是否需打卡：</td>
      <td colspan="3"><input type="radio" name="resttime_needP" value="1" <?php if($records['resttime_needP']==1) echo 'checked="checked"';?> />是 &nbsp;
      <input type="radio" name="resttime_needP" value="0" <?php if($records['resttime_needP']==0) echo 'checked="checked"';?> />否 &nbsp; </td>
    </tr>
    
    <tr>
      <td colspan="4"><b>厨房Q班</b></td>
    </tr>
    <tr>
      <td>班制性质：</td>
      <td><input type="radio" name="typeQ" value="1" checked="checked" />日班 &nbsp; </td>
      <td>工作小时数：</td>
      <td><input type="text" id="hoursQ" name="hoursQ" size="3" value="<?php echo $records['hoursQ']?$records['hoursQ']:8; ?>" />小时</td>
    </tr>
    <tr>
      <td>上班时间(00:00)：</td>
      <td><input type="text" id="starttimeQ" name="starttimeQ" size="8" value="<?php echo $records['starttimeQ']; ?>"/></td>
      <td>下班时间(00:00)：</td>
      <td><input type="text" id="endtimeQ" name="endtimeQ" size="8" value="<?php echo $records['endtimeQ']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段1-开始：</td>
      <td><input type="text" id="resttime_startQ1" name="resttime_startQ1" size="8" value="<?php echo $records['resttime_startQ1']; ?>" /></td>
      <td>休息时间段1-结束：</td>
      <td><input type="text" id="resttime_endQ1" name="resttime_endQ1" size="8" value="<?php echo $records['resttime_endQ1']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段2-开始：</td>
      <td><input type="text" id="resttime_startQ2" name="resttime_startQ2" size="8" value="<?php echo $records['resttime_startQ2']; ?>" /></td>
      <td>休息时间段2-结束：</td>
      <td><input type="text" id="resttime_endQ2" name="resttime_endQ2" size="8" value="<?php echo $records['resttime_endQ2']; ?>" /></td>
    </tr>
    <tr>
      <td>休息时间段是否需打卡：</td>
      <td colspan="3"><input type="radio" name="resttime_needQ" value="1" <?php if($records['resttime_needQ']==1) echo 'checked="checked"';?> />是 &nbsp;
      <input type="radio" name="resttime_needQ" value="0" <?php if($records['resttime_needQ']==0) echo 'checked="checked"';?> />否 &nbsp; </td>
    </tr>
    
  </table>

    <div class="formbuttons">
        <input type="submit" class="savebutton" id="saveBtn"
            onmouseover="moverButton(this);" onmouseout="moutButton(this);"
            value="<?php echo $lang_Common_Save;?>" />
    </div>
</form>
</div>
<script type="text/javascript">
//<![CDATA[
    if (document.getElementById && document.createElement) {
        roundBorder('outerbox');
    }
//]]>
</script>
</div>
